﻿using Guan.CMS.Model.Entities;

namespace Guan.CMS.Data.Initialization
{
    public class SiteConfigInit
    {
        public void Init(CmsDataContext context)
        {
            var config = new SiteConfig
                             {
                                 SiteName = "成信达科技有限公司",
                                 Footer = "Copyright ©2012 成信达科技有限公司 All Rights Reserved.",
                                 StatisticsCode =
                                     "<script type=\"text/javascript\">var _bdhmProtocol = ((\"https:\" == document.location.protocol) ? \" https://\" : \" http://\");document.write(unescape(\"%3Cscript src='\" + _bdhmProtocol + \"hm.baidu.com/h.js%3Febb201d13a213731d9927d0d3f86e84d' type='text/javascript'%3E%3C/script%3E\"));</script>",
                                 MetaKeywords = "关键字",
                                 MetaDescription = "描述"
                             };
            context.SiteConfigs.Add(config);
            context.SaveChanges();
        }
    }
}